/**
 * (C)2012 Exlu Corporation. All rights reserved.
 * 文件名 : cn.exlu.wea.tpk.email.Email.java
 * 注意事項   :
 */
package cn.exlu.coco.core.server.email;

import java.io.File;

import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.internet.AddressException;

/**
 * @author Mark 
 * @version 1.0.1
 * 2013-1-27
 * Email.java
 */
public abstract class Email {
   private Session session;
   private String sendFrom;
   private String subject;
   private String sendTo;
   private String text;
   private File file;
   
   abstract Message createMessage(Session session) throws AddressException, MessagingException;

/**
 * 获得session
 * @return session
 */
public Session getSession() {
    return session;
}

/**
 * 设置session
 * @param session session
 */
public void setSession(Session session) {
    this.session = session;
}

/**
 * 获得sendFrom
 * @return sendFrom
 */
public String getSendFrom() {
    return sendFrom;
}

/**
 * 设置sendFrom
 * @param sendFrom sendFrom
 */
public void setSendFrom(String sendFrom) {
    this.sendFrom = sendFrom;
}

/**
 * 获得subject
 * @return subject
 */
public String getSubject() {
    return subject;
}

/**
 * 设置subject
 * @param subject subject
 */
public void setSubject(String subject) {
    this.subject = subject;
}

/**
 * 获得sendTo
 * @return sendTo
 */
public String getSendTo() {
    return sendTo;
}

/**
 * 设置sendTo
 * @param sendTo sendTo
 */
public void setSendTo(String sendTo) {
    this.sendTo = sendTo;
}

/**
 * 获得text
 * @return text
 */
public String getText() {
    return text;
}

/**
 * 设置text
 * @param text text
 */
public void setText(String text) {
    this.text = text;
}

/**
 * 获得file
 * @return file
 */
public File getFile() {
    return file;
}

/**
 * 设置file
 * @param file file
 */
public void setFile(File file) {
    this.file = file;
}

}
